<%--
  Created by IntelliJ IDEA.
  User: 计划飞过海
  Date: 2021/4/7
  Time: 15:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>橡树科技－JavaDemoSystem</title>
    <link type="text/css" rel="stylesheet" media="all" href="/static/styles/global.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="/static/styles/global_color.css"/>
</head>
<body onLoad="initialYearAndMonth();">
<div id="header"> <img src="/static/images/logo.png"  alt="logo" class="left"/> <a href="#">[退出]</a> </div>
<div id="navi">
    <ul id="menu">
        <li><a href="/index"  class="index_off"></a></li>
        <li><a href="/role/role_list"  class="role_off"></a></li>
        <li><a href="/admin/admin_list"  class="admin_off"></a></li>
        <li><a href="/fee/fee_list" class="fee_off"></a></li>
        <li><a href="/account/account_list"  class="account_off"></a></li>
        <li><a href="/service/service_list"  class="service_off"></a></li>
        <li><a href="/bill/bill_list"  class="bill_on"></a></li>
        <li><a href="/report/report_list"  class="report_off"></a></li>
        <li><a href="/user/user_info" class="information_off"></a></li>
        <li><a href="/user/user_modi_pwd"  class="password_off"></a></li>
    </ul>
</div>
<div id="main">
    <form action="" method="">
        <div class="search_add">
            <div>账务账号：<span class="readonly width70">${newAccount.accountId}</span></div>
            <div>身份证：<span class="readonly width150">${newAccount.idcardNo}</span></div>
            <div>姓名：<span class="readonly width70">${newAccount.realName}</span></div>
            <div>计费时间：<span class="readonly width70">${newAccount.billMonth}月</span></div>
            <div>总费用：<span class="readonly width70">${newAccount.cost}元</span></div>
            <input type="button" value="返回" class="btn_add" onClick="location.href='/bill/bill_list'"/>
        </div>
        <div id="data">
            <table id="datalist">
                <tr>
                    <th class="width70">账单明细ID</th>
                    <th class="width150">OS 账号</th>
                    <th class="width150">服务器 IP</th>
                    <th class="width70">账务账号ID</th>
                    <th class="width150">时长</th>
                    <th>费用</th>
                    <th class="width150">资费</th>
                    <th class="width50"></th>
                </tr>
                <c:forEach items="${pageInfo.list}" var="r">
                    <tr>
                        <td>${r.billId}</td>
                        <td>${r.osUsername}</td>
                        <td>${r.unixHost}</td>
                        <td>${r.accountId}</td>
                        <td>${r.sumtime}</td>
                        <td>${r.pay}</td>
                        <td>包${r.baseDuration}小时</td>
                        <td><a href="/bill/bill_service_detail?accountId=${r.accountId}&cost=${r.cost}&osUsername=${r.osUsername}&unixHost=${r.unixHost}&billMonth=${newAccount.billMonth}" title="账单明细">详情</a></td>
                    </tr>
                </c:forEach>



            </table>
        </div>
        <div id="pages">
            <!--总记录数大于10条时显示分页 否则不显示分页信息-->
            <c:if test="${pageInfo.total >= 1}">
                <a href="/bill/bill_item?page=1">首页</a>
                <!--判断是否是第一页. 是: 显示当前页. 否: 当前页减一-->
                <c:if test="${pageInfo.isFirstPage}">
                    <a href="/bill/bill_item?page=${pageInfo.pageNum}">上一页</a>
                </c:if>
                <c:if test="${!pageInfo.isFirstPage}">
                    <a href="/bill/bill_item?page=${pageInfo.pageNum - 1 }">上一页</a>
                </c:if>
                <!--循环显示页码-->
                <c:forEach begin="1" end="${pageInfo.pages}" step="1" var="index">
                    <c:if test="${pageInfo.pageNum==index}">
                        <a class="current_page" href="/bill/bill_item?page=${index}">${index}</a>
                    </c:if>
                    <c:if test="${pageInfo.pageNum!=index}">
                        <a href="/bill/bill_item?page=${index}">${index}</a>
                    </c:if>
                </c:forEach>
                <!--判断是否是最后一页. 是: 显示当前页. 否: 当前页加一 -->
                <c:if test="${pageInfo.isLastPage}">
                    <a href="/bill/bill_item?page=${pageInfo.pageNum}">下一页</a>
                </c:if>
                <c:if test="${!pageInfo.isLastPage}">
                    <a href="/bill/bill_item?page=${pageInfo.pageNum + 1 }">下一页</a>

                </c:if>
                <a href="/bill/bill_item?page=${pageInfo.pages}">末页</a>
            </c:if>
        </div>
    </form>
</div>
<div id="footer">
    <p>[源自橡树的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</p>
    <p>版权所有(C)橡树信息科技有限公司 </p>
</div>
</body>
</html>
